package com.easyj.admin.db.model;

import java.io.Serializable;
import java.util.Date;

/**
 *   @title 数据导入结果
 *   @remark 
 *   @table b_imp_result
 *   @primaryKey id
 *   @enablePage true
 */
public class ImpResult implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *   @title 
     *   @remark 
     *   @column id
     *   @dataType BIGINT UNSIGNED
     *   @length 20
     *   @scale 0
     *   @nullable false
     *   @jdbcType BIGINT
     */
    private Long id;

    /**
     *   @title 导入名称
     *   @remark 
     *   @column name
     *   @dataType VARCHAR
     *   @length 100
     *   @scale 0
     *   @nullable false
     *   @jdbcType VARCHAR
     */
    private String name;

    /**
     *   @title 总记录数
     *   @remark 
     *   @column count
     *   @dataType INT
     *   @length 10
     *   @scale 0
     *   @nullable false
     *   @jdbcType INTEGER
     */
    private Integer count;

    /**
     *   @title 成功条数
     *   @remark 
     *   @column success
     *   @dataType INT
     *   @length 10
     *   @scale 0
     *   @nullable false
     *   @jdbcType INTEGER
     */
    private Integer success;

    /**
     *   @title 失败条数
     *   @remark 
     *   @column failure
     *   @dataType INT
     *   @length 10
     *   @scale 0
     *   @nullable false
     *   @jdbcType INTEGER
     */
    private Integer failure;

    /**
     *   @title 
     *   @remark 
     *   @column status
     *   @dataType INT
     *   @length 10
     *   @scale 0
     *   @nullable false
     *   @jdbcType INTEGER
     */
    private Integer status;

    /**
     *   @title 
     *   @remark 
     *   @column start_time
     *   @dataType DATETIME
     *   @length 19
     *   @scale 0
     *   @nullable false
     *   @jdbcType TIMESTAMP
     */
    private Date startTime;

    /**
     *   @title 
     *   @remark 
     *   @column finish_time
     *   @dataType DATETIME
     *   @length 19
     *   @scale 0
     *   @nullable true
     *   @jdbcType TIMESTAMP
     */
    private Date finishTime;

    /**
     *   @title 提示信息
     *   @remark 
     *   @column message
     *   @dataType VARCHAR
     *   @length 300
     *   @scale 0
     *   @nullable true
     *   @jdbcType VARCHAR
     */
    private String message;

    /**
     *   @title 
     *   @remark 
     *   @column operator_id
     *   @dataType BIGINT
     *   @length 19
     *   @scale 0
     *   @nullable true
     *   @jdbcType BIGINT
     */
    private Long operatorId;

    /**
     *   @title 结果文件(URL)
     *   @remark 记录错误的行或导入结果
     *   @column result_file
     *   @dataType VARCHAR
     *   @length 120
     *   @scale 0
     *   @nullable true
     *   @jdbcType VARCHAR
     */
    private String resultFile;
    
    //---------
    private String statusName;
    private String operatorName;

    
    public String getStatusName() {
		return statusName;
	}

	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}

	public String getOperatorName() {
		return operatorName;
	}

	public void setOperatorName(String operatorName) {
		this.operatorName = operatorName;
	}

	public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getSuccess() {
        return success;
    }

    public void setSuccess(Integer success) {
        this.success = success;
    }

    public Integer getFailure() {
        return failure;
    }

    public void setFailure(Integer failure) {
        this.failure = failure;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(Date finishTime) {
        this.finishTime = finishTime;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Long getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
    }

    public String getResultFile() {
        return resultFile;
    }

    public void setResultFile(String resultFile) {
        this.resultFile = resultFile;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ImpResult other = (ImpResult) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", count=").append(count);
        sb.append(", success=").append(success);
        sb.append(", failure=").append(failure);
        sb.append(", status=").append(status);
        sb.append(", startTime=").append(startTime);
        sb.append(", finishTime=").append(finishTime);
        sb.append(", message=").append(message);
        sb.append(", operatorId=").append(operatorId);
        sb.append(", resultFile=").append(resultFile);
        sb.append("]");
        return sb.toString();
    }
}